/* 时间轴选择器样式 */
.timeAxisSelector {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

/* 区域标签 */
.sectionLabel {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  margin-right: 12px;
  white-space: nowrap;
}

/* 视图切换器 */
.viewSwitcher {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viewButtons {
  display: flex;
  gap: 4px;
  background: #f8f9fa;
  padding: 4px;
  border-radius: 8px;
}

.viewButton {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #6c757d;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.viewButton:hover {
  background: #e9ecef;
  color: #495057;
}

.viewButton.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 时间导航器 */
.timeNavigator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.navButton {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #ffffff;
  color: #495057;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}

.navButton:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
  transform: translateY(-1px);
}

.navButton:active {
  transform: translateY(0);
}

.currentRange {
  flex: 1;
  text-align: center;
  padding: 0 16px;
}

.rangeText {
  font-size: 16px;
  font-weight: 600;
  color: #212529;
  display: block;
  margin-bottom: 4px;
}

.rangeInfo {
  font-size: 12px;
  color: #6c757d;
  display: block;
}

.todayButton {
  padding: 8px 16px;
  border: 2px solid #0d6efd;
  border-radius: 6px;
  background: #ffffff;
  color: #0d6efd;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.todayButton:hover {
  background: #0d6efd;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* 快速范围选择 */
.quickRanges {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.quickButtons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quickButton {
  padding: 6px 12px;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  background: #ffffff;
  color: #6c757d;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.quickButton:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
  color: #495057;
}

.quickButton.active {
  background: #28a745;
  border-color: #28a745;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.customButton {
  padding: 6px 12px;
  border: 1px solid #fd7e14;
  border-radius: 20px;
  background: #ffffff;
  color: #fd7e14;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.customButton:hover {
  background: #fd7e14;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(253, 126, 20, 0.3);
}

/* 自定义日期范围选择器 */
.customRangePicker {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 300px;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.customRangeHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #212529;
}

.closeButton {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 4px;
  border-radius: 4px;
}

.closeButton:hover {
  background: #f8f9fa;
}

.dateInputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.dateInput {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dateInput label {
  font-size: 13px;
  color: #495057;
  min-width: 80px;
}

.dateInput input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  color: #495057;
}

.dateInput input:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.customRangeActions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.applyButton {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  background: #28a745;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.applyButton:hover {
  background: #218838;
  transform: translateY(-1px);
}

.cancelButton {
  padding: 8px 16px;
  border: 1px solid #6c757d;
  border-radius: 4px;
  background: #ffffff;
  color: #6c757d;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancelButton:hover {
  background: #f8f9fa;
  border-color: #5a6268;
}

/* 视图信息提示 */
.viewInfo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #0d6efd;
}

.infoText {
  font-size: 12px;
  color: #6c757d;
  text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .timeAxisSelector {
    padding: 12px 16px;
    gap: 12px;
  }

  .viewSwitcher,
  .quickRanges {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .timeNavigator {
    flex-direction: column;
    gap: 8px;
  }

  .currentRange {
    order: -1;
    padding: 0;
    text-align: center;
  }

  .viewButtons,
  .quickButtons {
    flex-wrap: wrap;
    width: 100%;
  }

  .viewButton,
  .quickButton {
    flex: 1;
    min-width: 80px;
  }

  .customRangePicker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    right: auto;
    min-width: 280px;
    max-width: 90vw;
  }
}

@media (max-width: 480px) {
  .timeAxisSelector {
    margin: 8px 0;
    padding: 12px;
  }

  .sectionLabel {
    font-size: 13px;
  }

  .viewButton,
  .quickButton {
    font-size: 11px;
    padding: 6px 10px;
  }

  .rangeText {
    font-size: 14px;
  }

  .rangeInfo {
    font-size: 11px;
  }

  .infoText {
    font-size: 11px;
  }
}
